﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NPC模块结构
{
    class TaskNPC : NPC
    {
        private string _task;
        public TaskNPC(string name,NPCType type,string task) : base(name, type)
        {
            this.Task = task;
        }

        public string Task { get => _task; set => _task = value; }

        public override void Speak()
        {
            Console.WriteLine("类型{0}，{1}，任务:{2}",base.NPCType,base.Name,this.Task);
        }
    }
}
